from abc import ABC, abstractmethod
import sys


class Factory(ABC):
    @abstractmethod
    def geturl(self):
        pass

    @abstractmethod
    def callback(self, code):
        pass



class Dingding(Factory):
    def __init__(self):
        pass

    def geturl(self):
        return "https://www.dingtalk.com/"

    def callback(self, code):
        # 调用钉钉的接口，获取用户信息
        return {"uid": "234asfadr23fsd", "mobile": "134234"}



p = Dingding()